<?php
error_reporting(E_ALL & ~E_NOTICE);

$startTime = microtime(true);
$fileDir = dirname(__FILE__);

require($fileDir . '/library/XenForo/Autoloader.php');
XenForo_Autoloader::getInstance()->setupAutoloader($fileDir . '/library');

XenForo_Application::initialize($fileDir . '/library', $fileDir);
XenForo_Application::set('page_start_time', $startTime);

$request = new Zend_Controller_Request_Http();
$response = new Zend_Controller_Response_Http();


$server = new Api_Server($request, $response);

$extraMapper = array();

XenForo_CodeEvent::fire('add_api_mapper', &$extraMapper);

/** demo code */


/**
 * $extraMapper[] = array('classname', 'method');
 */

$server->addMapper('user', 'daniel1');
$server->addMapper('userneu', 'methodeuserneu');


$server->addMapperArray($extraMapper);

$return = $server->call('Thread', 'getThread', array(1));

die(print_r($return));